import request from "../utils/request";

// 下单 (商品ID：goods_id 支付方式：pay_way)
export const preCreate = (commodityPayment) => { 
    return request(`/api/order/preCreate`, 'POST', commodityPayment)
}

// 支付回调地址
export const pay = () => { 
    return request(`/api/order/pay`, 'POST')
}

// 购买记录
export const register = () => { 
    return request(`/api/order`, 'GET')
}

// 获取设备列表
export const getDevice = () => { 
    return request(`/api/user/getDevice`, 'GET')
}

// 移出设备 (设备识别码：imei)
export const removeDevice = (IMEI) => { 
    return request(`/api/user/removeDevice`, 'DELETE', IMEI)
}

// 邀请数据
export const inviteList = () => { 
    return request(`/api/user/inviteList`, 'GET')
}